var o = require("../common.js"), t = getApp();

Page({
    behaviors: [ o ],
    data: {
        tapShow: !1,
        cservice_info: [],
        goods: [],
        obj_info: [],
        store_info: [],
        showServicePopup: !1
    },
    onLoad: function(o) {
        this.getData(o.id);
    },
    setTapShow: function() {
        this.setData({
            tapShow: !this.data.tapShow
        });
    },
    openService: function() {
        this.setData({
            showServicePopup: !this.data.showServicePopup
        });
    },
    gotoGoods: function(o) {
        var t = o.currentTarget.dataset.id;
        wx.navigateTo({
            url: "/packageA/detail_v2/detail_v2?id=" + t
        });
    },
    goToAdress: function() {
        var o = this.data.store_info.lat, a = this.data.store_info.lng, e = this.data.store_info.name, n = t.BMapTransqqMap(parseFloat(a), parseFloat(o));
        console.log(n), wx.openLocation({
            latitude: n.lat,
            longitude: n.lng,
            scale: 18,
            name: e
        });
    },
    getData: function(o) {
        var a = this, e = t.getNetAddresss("plugin.reserve-simple.frontend.obj.detail");
        t._getNetWork({
            url: e,
            data: {
                id: o
            },
            success: function(o) {
                var e = o.data;
                if (1 != e.result) return t.tips(e.msg);
                a.setData({
                    obj_info: e.data.obj_info,
                    cservice_info: e.data.cservice,
                    store_info: e.data.store_info,
                    goods: e.data.goods_list
                });
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});